package com.journey.org.ui.knowledge

import android.os.Bundle
import com.journey.org.entity.MineBlogEntity
import com.journey.org.entity.PlayHomeEntity
import com.journey.org.ui.web.WebActivity
import com.mvvmhabit.org.base.MultiItemViewModel
import com.mvvmhabit.org.binding.command.BindingAction
import com.mvvmhabit.org.binding.command.BindingCommand


/**
 * @Date: 2020/11/30 10:42
 * @Author:小妖
 * @Description: - 知识-博客
 */
class KnowLedgeBlogViewModel(vm: KnowLedgeViewModel, val entity: PlayHomeEntity) :
    MultiItemViewModel<KnowLedgeViewModel>(vm) {

    val onClickEnterDetailCommand = BindingCommand<Any>(object : BindingAction {
        override fun call() {
            val bundle = Bundle()
            bundle.putString("loadUrl", entity.link)
            bundle.putString("title", entity.title)
            viewModel.startActivity(WebActivity::class.java, bundle)
        }
    })
}